package com.anyou.mall.parts.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.parts.mapper.PlaPartsClassifyFeeMapper;
import com.anyou.mall.parts.domain.PlaPartsClassifyFee;
import com.anyou.mall.parts.service.IPlaPartsClassifyFeeService;

/**
 * 配件分类一口价Service业务层处理
 *
 * @author ylj
 * @date 2022-03-21
 */
@Service
public class PlaPartsClassifyFeeServiceImpl extends ServiceImpl<PlaPartsClassifyFeeMapper, PlaPartsClassifyFee> implements IPlaPartsClassifyFeeService
{
    @Autowired
    private PlaPartsClassifyFeeMapper plaPartsClassifyFeeMapper;

    /**
     * 查询配件分类一口价
     *
     * @param partsClassifyFeeId 配件分类一口价主键
     * @return 配件分类一口价
     */
    @Override
    public PlaPartsClassifyFee selectPlaPartsClassifyFeeByPartsClassifyFeeId(Long partsClassifyFeeId)
    {
        return plaPartsClassifyFeeMapper.selectPlaPartsClassifyFeeByPartsClassifyFeeId(partsClassifyFeeId);
    }

    /**
     * 查询配件分类一口价列表
     *
     * @param plaPartsClassifyFee 配件分类一口价
     * @return 配件分类一口价
     */
    @Override
    public List<PlaPartsClassifyFee> selectPlaPartsClassifyFeeList(PlaPartsClassifyFee plaPartsClassifyFee)
    {
        return plaPartsClassifyFeeMapper.selectPlaPartsClassifyFeeList(plaPartsClassifyFee);
    }

    /**
     * 新增配件分类一口价
     *
     * @param plaPartsClassifyFee 配件分类一口价
     * @return 结果
     */
    @Override
    public int insertPlaPartsClassifyFee(PlaPartsClassifyFee plaPartsClassifyFee)
    {
        plaPartsClassifyFee.setCreateTime(DateUtils.getNowDate());
        return plaPartsClassifyFeeMapper.insertPlaPartsClassifyFee(plaPartsClassifyFee);
    }

    /**
     * 修改配件分类一口价
     *
     * @param plaPartsClassifyFee 配件分类一口价
     * @return 结果
     */
    @Override
    public int updatePlaPartsClassifyFee(PlaPartsClassifyFee plaPartsClassifyFee)
    {
        plaPartsClassifyFee.setUpdateTime(DateUtils.getNowDate());
        return plaPartsClassifyFeeMapper.updatePlaPartsClassifyFee(plaPartsClassifyFee);
    }

    /**
     * 批量删除配件分类一口价
     *
     * @param partsClassifyFeeIds 需要删除的配件分类一口价主键
     * @return 结果
     */
    @Override
    public int deletePlaPartsClassifyFeeByPartsClassifyFeeIds(Long[] partsClassifyFeeIds)
    {
        return plaPartsClassifyFeeMapper.deletePlaPartsClassifyFeeByPartsClassifyFeeIds(partsClassifyFeeIds);
    }

    /**
     * 删除配件分类一口价信息
     *
     * @param partsClassifyFeeId 配件分类一口价主键
     * @return 结果
     */
    @Override
    public int deletePlaPartsClassifyFeeByPartsClassifyFeeId(Long partsClassifyFeeId)
    {
        return plaPartsClassifyFeeMapper.deletePlaPartsClassifyFeeByPartsClassifyFeeId(partsClassifyFeeId);
    }
}
